﻿
Namespace LightSwitchApplication

    Public Class EmployeeTimesheet

        

        Private Sub EmployeeTimesheet_InitializeDataWorkspace(saveChangesTo As System.Collections.Generic.List(Of Microsoft.LightSwitch.IDataService))
            ' Write your code here.
            If prpPayPeriod Is Nothing Then
                Me.prpPayPeriod = Me.PayPeriods.SelectedItem
            End If
        End Sub

        Private Sub prpPayPeriod_Changed()
            If Me.PayPeriods.SelectedItem.Status = 0 Then
                Me.FindControl("gridTimesheet").IsReadOnly = True
            Else
                Me.FindControl("gridTimesheet").IsReadOnly = False
            End If
        End Sub
    End Class

End Namespace
